package com.gitee.wsl.mathematics.function.active

import kotlin.math.exp


/**
 * @param
 * @DATA
 * @Author LiDaPeng
 * @Description
 */
class Sigmoid : ActiveFunction {
    override fun function(x: Float): Float {
        return 1 / (1 + exp(-x))
    }

    override fun functionG(out: Float): Float {
        return out * (1 - out)
    }
}
